<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>class WIN32OLE::Type - win32ole: Ruby Standard Library Documentation</title>


<script src="../js/navigation.js" defer></script>
<script src="../js/search.js" defer></script>
<script src="../js/search_index.js" defer></script>
<script src="../js/searcher.js" defer></script>
<script src="../js/darkfish.js" defer></script>

<script src="../js/jquery-3.2.0.min.js"></script>

<script src="../js/vue.min.js"></script>
<script src="../js/js.cookie.min.js"></script>

<link href="../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../css/rdoc.css" rel="stylesheet">
<link href="../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../";
  var index_rel_prefix = "../";
  var darkModeCsseHref = "../css/rdoc-dm.css"
  var defaultModeCssHref = "../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="class">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../table_of_contents.html#pages">Pages</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
<div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  <p class="link"><a href="../Object.html">Object</a>
</div>

        
        
        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li ><a href="#method-c-new">::new</a>
    <li ><a href="#method-c-ole_classes">::ole_classes</a>
    <li ><a href="#method-c-progids">::progids</a>
    <li ><a href="#method-c-typelibs">::typelibs</a>
    <li ><a href="#method-i-default_event_sources">#default_event_sources</a>
    <li ><a href="#method-i-default_ole_types">#default_ole_types</a>
    <li ><a href="#method-i-guid">#guid</a>
    <li ><a href="#method-i-helpcontext">#helpcontext</a>
    <li ><a href="#method-i-helpfile">#helpfile</a>
    <li ><a href="#method-i-helpstring">#helpstring</a>
    <li ><a href="#method-i-implemented_ole_types">#implemented_ole_types</a>
    <li ><a href="#method-i-inspect">#inspect</a>
    <li ><a href="#method-i-major_version">#major_version</a>
    <li ><a href="#method-i-minor_version">#minor_version</a>
    <li ><a href="#method-i-name">#name</a>
    <li ><a href="#method-i-ole_methods">#ole_methods</a>
    <li ><a href="#method-i-ole_type">#ole_type</a>
    <li ><a href="#method-i-ole_typelib">#ole_typelib</a>
    <li ><a href="#method-i-progid">#progid</a>
    <li ><a href="#method-i-source_ole_types">#source_ole_types</a>
    <li ><a href="#method-i-src_type">#src_type</a>
    <li ><a href="#method-i-to_s">#to_s</a>
    <li ><a href="#method-i-typekind">#typekind</a>
    <li ><a href="#method-i-variables">#variables</a>
    <li ><a href="#method-i-visible-3F">#visible?</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="class-WIN32OLE::Type">
    <h1 id="class-WIN32OLE::Type" class="class">
      class WIN32OLE::Type
    </h1>

    <section class="description">
    
    </section>

      <section id="5Buntitled-5D" class="documentation-section">





                <section id="public-class-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Class Methods</h3>
                </header>

                  <div id="method-c-new" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          new(typelib, ole_class) &rarr; WIN32OLE_TYPE object
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns a new WIN32OLE_TYPE object. The first argument <em>typelib</em> specifies OLE type library name. The second argument specifies OLE class name.</p>

<pre class="ruby"><span class="ruby-constant">WIN32OLE_TYPE</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;Microsoft Excel 9.0 Object Library&#39;</span>, <span class="ruby-string">&#39;Application&#39;</span>)
    <span class="ruby-comment"># =&gt; WIN32OLE_TYPE object of Application class of Excel.</span>
</pre>

                              <div class="method-source-code" id="new-source">
            <pre>static VALUE
foletype_initialize(VALUE self, VALUE typelib, VALUE oleclass)
{
    VALUE file;
    OLECHAR * pbuf;
    ITypeLib *pTypeLib;
    HRESULT hr;

    SafeStringValue(oleclass);
    SafeStringValue(typelib);
    file = typelib_file(typelib);
    if (file == Qnil) {
        file = typelib;
    }
    pbuf = ole_vstr2wc(file);
    hr = LoadTypeLibEx(pbuf, REGKIND_NONE, &amp;pTypeLib);
    if (FAILED(hr))
        ole_raise(hr, eWIN32OLERuntimeError, &quot;failed to LoadTypeLibEx&quot;);
    SysFreeString(pbuf);
    if (oleclass_from_typelib(self, pTypeLib, oleclass) == Qfalse) {
        OLE_RELEASE(pTypeLib);
        rb_raise(eWIN32OLERuntimeError, &quot;not found `%s` in `%s`&quot;,
                 StringValuePtr(oleclass), StringValuePtr(typelib));
    }
    OLE_RELEASE(pTypeLib);
    return self;
}</pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-ole_classes" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          ole_classes(typelib)
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns array of WIN32OLE_TYPE objects defined by the <em>typelib</em> type library. This method will be OBSOLETE. Use WIN32OLE_TYPELIB.new(typelib).ole_classes instead.</p>

                              <div class="method-source-code" id="ole_classes-source">
            <pre>static VALUE
foletype_s_ole_classes(VALUE self, VALUE typelib)
{
    VALUE obj;

    /*
    rb_warn(&quot;%s is obsolete; use %s instead.&quot;,
            &quot;WIN32OLE_TYPE.ole_classes&quot;,
            &quot;WIN32OLE_TYPELIB.new(typelib).ole_types&quot;);
    */
    obj = rb_funcall(cWIN32OLE_TYPELIB, rb_intern(&quot;new&quot;), 1, typelib);
    return rb_funcall(obj, rb_intern(&quot;ole_types&quot;), 0);
}</pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-progids" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          progids
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns array of ProgID.</p>

                              <div class="method-source-code" id="progids-source">
            <pre>static VALUE
foletype_s_progids(VALUE self)
{
    HKEY hclsids, hclsid;
    DWORD i;
    LONG err;
    VALUE clsid;
    VALUE v = rb_str_new2(&quot;&quot;);
    VALUE progids = rb_ary_new();

    err = reg_open_key(HKEY_CLASSES_ROOT, &quot;CLSID&quot;, &amp;hclsids);
    if(err != ERROR_SUCCESS) {
        return progids;
    }
    for(i = 0; ; i++) {
        clsid = reg_enum_key(hclsids, i);
        if (clsid == Qnil)
            break;
        err = reg_open_vkey(hclsids, clsid, &amp;hclsid);
        if (err != ERROR_SUCCESS)
            continue;
        if ((v = reg_get_val2(hclsid, &quot;ProgID&quot;)) != Qnil)
            rb_ary_push(progids, v);
        if ((v = reg_get_val2(hclsid, &quot;VersionIndependentProgID&quot;)) != Qnil)
            rb_ary_push(progids, v);
        RegCloseKey(hclsid);
    }
    RegCloseKey(hclsids);
    return progids;
}</pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-typelibs" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          typelibs
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns array of type libraries. This method will be OBSOLETE. Use WIN32OLE_TYPELIB.typelibs.collect{|t| t.name} instead.</p>

                              <div class="method-source-code" id="typelibs-source">
            <pre>static VALUE
foletype_s_typelibs(VALUE self)
{
    /*
    rb_warn(&quot;%s is obsolete. use %s instead.&quot;,
            &quot;WIN32OLE_TYPE.typelibs&quot;,
            &quot;WIN32OLE_TYPELIB.typelibs.collect{t|t.name}&quot;);
    */
    return rb_eval_string(&quot;WIN32OLE_TYPELIB.typelibs.collect{|t|t.name}&quot;);
}</pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Instance Methods</h3>
                </header>

                  <div id="method-i-default_event_sources" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          WIN32OLE_TYPE#default_event_sources
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns the array of WIN32OLE_TYPE object which is implemented by the WIN32OLE_TYPE object and having IMPLTYPEFLAG_FSOURCE and IMPLTYPEFLAG_FDEFAULT.</p>

<pre class="ruby"><span class="ruby-identifier">tobj</span> = <span class="ruby-constant">WIN32OLE_TYPE</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;Microsoft Internet Controls&#39;</span>, <span class="ruby-string">&quot;InternetExplorer&quot;</span>)
<span class="ruby-identifier">p</span> <span class="ruby-identifier">tobj</span>.<span class="ruby-identifier">default_event_sources</span>  <span class="ruby-comment"># =&gt; [#&lt;WIN32OLE_TYPE:DWebBrowserEvents2&gt;]</span>
</pre>

                              <div class="method-source-code" id="default_event_sources-source">
            <pre>static VALUE
foletype_default_event_sources(VALUE self)
{
    ITypeInfo *pTypeInfo = itypeinfo(self);
    return ole_type_impl_ole_types(pTypeInfo, IMPLTYPEFLAG_FSOURCE|IMPLTYPEFLAG_FDEFAULT);
}</pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-default_ole_types" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          WIN32OLE_TYPE#default_ole_types
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns the array of WIN32OLE_TYPE object which is implemented by the WIN32OLE_TYPE object and having IMPLTYPEFLAG_FDEFAULT.</p>

<pre class="ruby"><span class="ruby-identifier">tobj</span> = <span class="ruby-constant">WIN32OLE_TYPE</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;Microsoft Internet Controls&#39;</span>, <span class="ruby-string">&quot;InternetExplorer&quot;</span>)
<span class="ruby-identifier">p</span> <span class="ruby-identifier">tobj</span>.<span class="ruby-identifier">default_ole_types</span>
<span class="ruby-comment"># =&gt; [#&lt;WIN32OLE_TYPE:IWebBrowser2&gt;, #&lt;WIN32OLE_TYPE:DWebBrowserEvents2&gt;]</span>
</pre>

                              <div class="method-source-code" id="default_ole_types-source">
            <pre>static VALUE
foletype_default_ole_types(VALUE self)
{
    ITypeInfo *pTypeInfo = itypeinfo(self);
    return ole_type_impl_ole_types(pTypeInfo, IMPLTYPEFLAG_FDEFAULT);
}</pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-guid" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          WIN32OLE_TYPE#guid  #&rarr; GUID
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns GUID.</p>

<pre class="ruby"><span class="ruby-identifier">tobj</span> = <span class="ruby-constant">WIN32OLE_TYPE</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;Microsoft Excel 9.0 Object Library&#39;</span>, <span class="ruby-string">&#39;Application&#39;</span>)
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">tobj</span>.<span class="ruby-identifier">guid</span>  <span class="ruby-comment"># =&gt; {00024500-0000-0000-C000-000000000046}</span>
</pre>

                              <div class="method-source-code" id="guid-source">
            <pre>static VALUE
foletype_guid(VALUE self)
{
    ITypeInfo *pTypeInfo = itypeinfo(self);
    return ole_type_guid(pTypeInfo);
}</pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-helpcontext" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          WIN32OLE_TYPE#helpcontext
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns helpcontext. If helpcontext is not found, then returns nil.</p>

<pre class="ruby"><span class="ruby-identifier">tobj</span> = <span class="ruby-constant">WIN32OLE_TYPE</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;Microsoft Excel 9.0 Object Library&#39;</span>, <span class="ruby-string">&#39;Worksheet&#39;</span>)
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">tobj</span>.<span class="ruby-identifier">helpfile</span> <span class="ruby-comment"># =&gt; 131185</span>
</pre>

                              <div class="method-source-code" id="helpcontext-source">
            <pre>static VALUE
foletype_helpcontext(VALUE self)
{
    ITypeInfo *pTypeInfo = itypeinfo(self);
    return ole_type_helpcontext(pTypeInfo);
}</pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-helpfile" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          WIN32OLE_TYPE#helpfile
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns helpfile path. If helpfile is not found, then returns nil.</p>

<pre class="ruby"><span class="ruby-identifier">tobj</span> = <span class="ruby-constant">WIN32OLE_TYPE</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;Microsoft Excel 9.0 Object Library&#39;</span>, <span class="ruby-string">&#39;Worksheet&#39;</span>)
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">tobj</span>.<span class="ruby-identifier">helpfile</span> <span class="ruby-comment"># =&gt; C:\...\VBAXL9.CHM</span>
</pre>

                              <div class="method-source-code" id="helpfile-source">
            <pre>static VALUE
foletype_helpfile(VALUE self)
{
    ITypeInfo *pTypeInfo = itypeinfo(self);
    return ole_type_helpfile(pTypeInfo);
}</pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-helpstring" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          WIN32OLE_TYPE#helpstring #&rarr; help string.
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns help string.</p>

<pre class="ruby"><span class="ruby-identifier">tobj</span> = <span class="ruby-constant">WIN32OLE_TYPE</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;Microsoft Internet Controls&#39;</span>, <span class="ruby-string">&#39;IWebBrowser&#39;</span>)
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">tobj</span>.<span class="ruby-identifier">helpstring</span> <span class="ruby-comment"># =&gt; Web Browser interface</span>
</pre>

                              <div class="method-source-code" id="helpstring-source">
            <pre>static VALUE
foletype_helpstring(VALUE self)
{
    ITypeInfo *pTypeInfo = itypeinfo(self);
    return ole_type_helpstring(pTypeInfo);
}</pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-implemented_ole_types" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          WIN32OLE_TYPE#implemented_ole_types
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns the array of WIN32OLE_TYPE object which is implemented by the WIN32OLE_TYPE object.</p>

<pre class="ruby"><span class="ruby-identifier">tobj</span> = <span class="ruby-constant">WIN32OLE_TYPE</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;Microsoft Excel 9.0 Object Library&#39;</span>, <span class="ruby-string">&#39;Worksheet&#39;</span>)
<span class="ruby-identifier">p</span> <span class="ruby-identifier">tobj</span>.<span class="ruby-identifier">implemented_ole_types</span> <span class="ruby-comment"># =&gt; [_Worksheet, DocEvents]</span>
</pre>

                              <div class="method-source-code" id="implemented_ole_types-source">
            <pre>static VALUE
foletype_impl_ole_types(VALUE self)
{
    ITypeInfo *pTypeInfo = itypeinfo(self);
    return ole_type_impl_ole_types(pTypeInfo, 0);
}</pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-inspect" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          WIN32OLE_TYPE#inspect &rarr; String
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns the type name with class name.</p>

<pre>ie = WIN32OLE.new(&#39;InternetExplorer.Application&#39;)
ie.ole_type.inspect =&gt; #&lt;WIN32OLE_TYPE:IWebBrowser2&gt;</pre>

                              <div class="method-source-code" id="inspect-source">
            <pre>static VALUE
foletype_inspect(VALUE self)
{
    return default_inspect(self, &quot;WIN32OLE_TYPE&quot;);
}</pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-major_version" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          WIN32OLE_TYPE#major_version
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns major version.</p>

<pre class="ruby"><span class="ruby-identifier">tobj</span> = <span class="ruby-constant">WIN32OLE_TYPE</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;Microsoft Word 10.0 Object Library&#39;</span>, <span class="ruby-string">&#39;Documents&#39;</span>)
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">tobj</span>.<span class="ruby-identifier">major_version</span> <span class="ruby-comment"># =&gt; 8</span>
</pre>

                              <div class="method-source-code" id="major_version-source">
            <pre>static VALUE
foletype_major_version(VALUE self)
{
    ITypeInfo *pTypeInfo = itypeinfo(self);
    return ole_type_major_version(pTypeInfo);
}</pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-minor_version" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          WIN32OLE_TYPE#minor_version #&rarr; OLE minor version
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns minor version.</p>

<pre class="ruby"><span class="ruby-identifier">tobj</span> = <span class="ruby-constant">WIN32OLE_TYPE</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;Microsoft Word 10.0 Object Library&#39;</span>, <span class="ruby-string">&#39;Documents&#39;</span>)
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">tobj</span>.<span class="ruby-identifier">minor_version</span> <span class="ruby-comment"># =&gt; 2</span>
</pre>

                              <div class="method-source-code" id="minor_version-source">
            <pre>static VALUE
foletype_minor_version(VALUE self)
{
    ITypeInfo *pTypeInfo = itypeinfo(self);
    return ole_type_minor_version(pTypeInfo);
}</pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-name" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          WIN32OLE_TYPE#name #&rarr; OLE type name
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns OLE type name.</p>

<pre class="ruby"><span class="ruby-identifier">tobj</span> = <span class="ruby-constant">WIN32OLE_TYPE</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;Microsoft Excel 9.0 Object Library&#39;</span>, <span class="ruby-string">&#39;Application&#39;</span>)
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">tobj</span>.<span class="ruby-identifier">name</span>  <span class="ruby-comment"># =&gt; Application</span>
</pre>

                              <div class="method-source-code" id="name-source">
            <pre>static VALUE
foletype_name(VALUE self)
{
    return rb_ivar_get(self, rb_intern(&quot;name&quot;));
}</pre>
                              </div>
                            </div>

                            <div class="aliases">
                              Also aliased as: <a href="Type.html#method-i-to_s">to_s</a>
                            </div>

                          </div>

                  <div id="method-i-ole_methods" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          WIN32OLE_TYPE#ole_methods # the array of WIN32OLE_METHOD objects.
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns array of WIN32OLE_METHOD objects which represent OLE method defined in OLE type library.</p>

<pre class="ruby"><span class="ruby-identifier">tobj</span> = <span class="ruby-constant">WIN32OLE_TYPE</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;Microsoft Excel 9.0 Object Library&#39;</span>, <span class="ruby-string">&#39;Worksheet&#39;</span>)
<span class="ruby-identifier">methods</span> = <span class="ruby-identifier">tobj</span>.<span class="ruby-identifier">ole_methods</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span>
  <span class="ruby-identifier">m</span>.<span class="ruby-identifier">name</span>
}
<span class="ruby-comment"># =&gt; [&#39;Activate&#39;, &#39;Copy&#39;, &#39;Delete&#39;,....]</span>
</pre>

                              <div class="method-source-code" id="ole_methods-source">
            <pre>static VALUE
foletype_methods(VALUE self)
{
    ITypeInfo *pTypeInfo = itypeinfo(self);
    return ole_methods_from_typeinfo(pTypeInfo, INVOKE_FUNC | INVOKE_PROPERTYGET | INVOKE_PROPERTYPUT | INVOKE_PROPERTYPUTREF);
}</pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-ole_type" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          WIN32OLE_TYPE#ole_type #&rarr; OLE type string.
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>returns type of OLE class.</p>

<pre class="ruby"><span class="ruby-identifier">tobj</span> = <span class="ruby-constant">WIN32OLE_TYPE</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;Microsoft Excel 9.0 Object Library&#39;</span>, <span class="ruby-string">&#39;Application&#39;</span>)
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">tobj</span>.<span class="ruby-identifier">ole_type</span>  <span class="ruby-comment"># =&gt; Class</span>
</pre>

                              <div class="method-source-code" id="ole_type-source">
            <pre>static VALUE
foletype_ole_type(VALUE self)
{
    ITypeInfo *pTypeInfo = itypeinfo(self);
    return ole_ole_type(pTypeInfo);
}</pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-ole_typelib" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          WIN32OLE_TYPE#ole_typelib
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns the WIN32OLE_TYPELIB object which is including the WIN32OLE_TYPE object. If it is not found, then returns nil.</p>

<pre class="ruby"><span class="ruby-identifier">tobj</span> = <span class="ruby-constant">WIN32OLE_TYPE</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;Microsoft Excel 9.0 Object Library&#39;</span>, <span class="ruby-string">&#39;Worksheet&#39;</span>)
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">tobj</span>.<span class="ruby-identifier">ole_typelib</span> <span class="ruby-comment"># =&gt; &#39;Microsoft Excel 9.0 Object Library&#39;</span>
</pre>

                              <div class="method-source-code" id="ole_typelib-source">
            <pre>static VALUE
foletype_ole_typelib(VALUE self)
{
    ITypeInfo *pTypeInfo = itypeinfo(self);
    return ole_typelib_from_itypeinfo(pTypeInfo);
}</pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-progid" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          WIN32OLE_TYPE#progid  #&rarr; ProgID
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns ProgID if it exists. If not found, then returns nil.</p>

<pre class="ruby"><span class="ruby-identifier">tobj</span> = <span class="ruby-constant">WIN32OLE_TYPE</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;Microsoft Excel 9.0 Object Library&#39;</span>, <span class="ruby-string">&#39;Application&#39;</span>)
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">tobj</span>.<span class="ruby-identifier">progid</span>  <span class="ruby-comment"># =&gt;   Excel.Application.9</span>
</pre>

                              <div class="method-source-code" id="progid-source">
            <pre>static VALUE
foletype_progid(VALUE self)
{
    ITypeInfo *pTypeInfo = itypeinfo(self);
    return ole_type_progid(pTypeInfo);
}</pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-source_ole_types" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          WIN32OLE_TYPE#source_ole_types
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns the array of WIN32OLE_TYPE object which is implemented by the WIN32OLE_TYPE object and having IMPLTYPEFLAG_FSOURCE.</p>

<pre class="ruby"><span class="ruby-identifier">tobj</span> = <span class="ruby-constant">WIN32OLE_TYPE</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;Microsoft Internet Controls&#39;</span>, <span class="ruby-string">&quot;InternetExplorer&quot;</span>)
<span class="ruby-identifier">p</span> <span class="ruby-identifier">tobj</span>.<span class="ruby-identifier">source_ole_types</span>
<span class="ruby-comment"># =&gt; [#&lt;WIN32OLE_TYPE:DWebBrowserEvents2&gt;, #&lt;WIN32OLE_TYPE:DWebBrowserEvents&gt;]</span>
</pre>

                              <div class="method-source-code" id="source_ole_types-source">
            <pre>static VALUE
foletype_source_ole_types(VALUE self)
{
    ITypeInfo *pTypeInfo = itypeinfo(self);
    return ole_type_impl_ole_types(pTypeInfo, IMPLTYPEFLAG_FSOURCE);
}</pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-src_type" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          WIN32OLE_TYPE#src_type #&rarr; OLE source class
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns source class when the OLE class is ‘Alias’.</p>

<pre class="ruby"><span class="ruby-identifier">tobj</span> =  <span class="ruby-constant">WIN32OLE_TYPE</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;Microsoft Office 9.0 Object Library&#39;</span>, <span class="ruby-string">&#39;MsoRGBType&#39;</span>)
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">tobj</span>.<span class="ruby-identifier">src_type</span> <span class="ruby-comment"># =&gt; I4</span>
</pre>

                              <div class="method-source-code" id="src_type-source">
            <pre>static VALUE
foletype_src_type(VALUE self)
{
    ITypeInfo *pTypeInfo = itypeinfo(self);
    return ole_type_src_type(pTypeInfo);
}</pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-to_s" class="method-detail method-alias">
                      <div class="method-heading">
                        <span class="method-callseq">
                          WIN32OLE_TYPE#name #&rarr; OLE type name
                              </span>
                            </div>

                            <div class="method-description">
                              <p>Returns OLE type name.</p>

<pre class="ruby"><span class="ruby-identifier">tobj</span> = <span class="ruby-constant">WIN32OLE_TYPE</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;Microsoft Excel 9.0 Object Library&#39;</span>, <span class="ruby-string">&#39;Application&#39;</span>)
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">tobj</span>.<span class="ruby-identifier">name</span>  <span class="ruby-comment"># =&gt; Application</span>
</pre>

                            </div>


                            <div class="aliases">
                              Alias for: <a href="Type.html#method-i-name">name</a>
                            </div>
                          </div>

                  <div id="method-i-typekind" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          WIN32OLE_TYPE#typekind #&rarr; number of type.
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns number which represents type.</p>

<pre class="ruby"><span class="ruby-identifier">tobj</span> = <span class="ruby-constant">WIN32OLE_TYPE</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;Microsoft Word 10.0 Object Library&#39;</span>, <span class="ruby-string">&#39;Documents&#39;</span>)
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">tobj</span>.<span class="ruby-identifier">typekind</span> <span class="ruby-comment"># =&gt; 4</span>
</pre>

                              <div class="method-source-code" id="typekind-source">
            <pre>static VALUE
foletype_typekind(VALUE self)
{
    ITypeInfo *pTypeInfo = itypeinfo(self);
    return ole_type_typekind(pTypeInfo);
}</pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-variables" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          WIN32OLE_TYPE#variables
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns array of WIN32OLE_VARIABLE objects which represent variables defined in OLE class.</p>

<pre class="ruby"><span class="ruby-identifier">tobj</span> = <span class="ruby-constant">WIN32OLE_TYPE</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;Microsoft Excel 9.0 Object Library&#39;</span>, <span class="ruby-string">&#39;XlSheetType&#39;</span>)
<span class="ruby-identifier">vars</span> = <span class="ruby-identifier">tobj</span>.<span class="ruby-identifier">variables</span>
<span class="ruby-identifier">vars</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
  <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{v.name} = #{v.value}&quot;</span>
<span class="ruby-keyword">end</span>

<span class="ruby-constant">The</span> <span class="ruby-identifier">result</span> <span class="ruby-identifier">of</span> <span class="ruby-identifier">above</span> <span class="ruby-identifier">sample</span> <span class="ruby-identifier">script</span> <span class="ruby-identifier">is</span> <span class="ruby-value">follows:</span>
  <span class="ruby-identifier">xlChart</span> = <span class="ruby-value">-4109</span>
  <span class="ruby-identifier">xlDialogSheet</span> = <span class="ruby-value">-4116</span>
  <span class="ruby-identifier">xlExcel4IntlMacroSheet</span> = <span class="ruby-value">4</span>
  <span class="ruby-identifier">xlExcel4MacroSheet</span> = <span class="ruby-value">3</span>
  <span class="ruby-identifier">xlWorksheet</span> = <span class="ruby-value">-4167</span>
</pre>

                              <div class="method-source-code" id="variables-source">
            <pre>static VALUE
foletype_variables(VALUE self)
{
    ITypeInfo *pTypeInfo = itypeinfo(self);
    return ole_variables(pTypeInfo);
}</pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-visible-3F" class="method-detail ">
                      <div class="method-heading">
                        <span class="method-callseq">
                          WIN32OLE_TYPE#visible?  #&rarr; true or false
                              </span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns true if the OLE class is public.</p>

<pre class="ruby"><span class="ruby-identifier">tobj</span> = <span class="ruby-constant">WIN32OLE_TYPE</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;Microsoft Excel 9.0 Object Library&#39;</span>, <span class="ruby-string">&#39;Application&#39;</span>)
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">tobj</span>.<span class="ruby-identifier">visible</span>  <span class="ruby-comment"># =&gt; true</span>
</pre>

                              <div class="method-source-code" id="visible-3F-source">
            <pre>static VALUE
foletype_visible(VALUE self)
{
    ITypeInfo *pTypeInfo = itypeinfo(self);
    return ole_type_visible(pTypeInfo);
}</pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is a service of <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>, purveyors of fine <a href='https://jamesbritt.bandcamp.com/'>dance noise</a></p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

